﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Hired
{
    public partial class empcreatejob : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, ImageClickEventArgs e)
        {
            Job createJob = new Job();

            #region Converting field values to code attributes

            //attribute(createJob)
            createJob.Title = txtTitle.Text;
            createJob.Description = txtDescription.Text;
            createJob.Type = txtType.Text;
            createJob.MinimumQualifications = txtQualification.Text;
            createJob.Industry = ddlJobIndustry.Text;
            createJob.Location = txtLocation.Text;
            createJob.WorkingHours = txtWorkingHours.Text;
            createJob.EstimatedSalary = txtSalary.Text;
            createJob.Timestamp = System.DateTime.Now;

            DBJob.CreateJob(createJob);


            #endregion

        }
    }
}